<%@ page import="com.Liuhang.entity.user" %>
    <%@ page import="com.Liuhang.Dao.getDepList" %>
        <%@ page import="java.util.List" %>
            <%--
  Created by IntelliJ IDEA.
  User: Mr_Liu
  Date: 2022/3/3
  Time: 0:38
  To change this template use File | Settings | File Templates.
--%>
                <%@ page contentType="text/html;charset=UTF-8" language="java" %>
                    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
                        <html>

                        <head>
                            <title>Title</title>
                        </head>

                        <body>
                            <% user u1 = (user) request.getAttribute("u1");
                                List list = getDepList.getList();
                                request.setAttribute("list",list);
                            %>

                                <form action="user_update" method="get">
                                    <p>ID:<input type="text" readonly="readonly" value="${u1.getId()}" name="id"></p>
                                    <p>姓名：<input type="text" placeholder="${u1.getName()}" value="${u1.getName()}" name="name"></p>
                                    <p>性别：<input type="text" placeholder="${u1.getSex()}" value="${u1.getSex()}" name="sex"></p>
                                    <p>联系方式：<input type="text" placeholder="${u1.getPhone()}" value="${u1.getPhone()}" name="phone"></p>
                                    <p>部门：<select name="dep">
                    <c:forEach var="u" items="${list}">
                        <option value="${u.getPid()}"><c:out value="${u.getDep_name()}"/></option>
                    </c:forEach>
                    </select></p>
                                    <p>薪资：<input type="text" placeholder="${u1.getMoney()}" value="${u1.getMoney()}" name="money"></p>
                                    <p>密码：<input type="text" placeholder="${u1.getPasswd()}" value="${u1.getPasswd()}" name="passwd"></p>
                                    <button type=" submit ">提交</button>
                                </form>
                        </body>

                        </html>